import 'package:lcapp/data/withdraw_entity_entity.dart';
import 'dart:core';

withdrawEntityEntityFromJson(WithdrawEntityEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'] is String
				? int.tryParse(json['id'])
				: json['id'].toInt();
	}
	if (json['userId'] != null) {
		data.userId = json['userId'] is String
				? int.tryParse(json['userId'])
				: json['userId'].toInt();
	}
	if (json['amnnId'] != null) {
		data.amnnId = json['amnnId'] is String
				? int.tryParse(json['amnnId'])
				: json['amnnId'].toInt();
	}
	if (json['phone'] != null) {
		data.phone = json['phone'].toString();
	}
	if (json['alipay'] != null) {
		data.alipay = json['alipay'].toString();
	}
	if (json['unionpay'] != null) {
		data.unionpay = json['unionpay'].toString();
	}
	if (json['state'] != null) {
		data.state = json['state'] is String
				? int.tryParse(json['state'])
				: json['state'].toInt();
	}
	if (json['openBank'] != null) {
		data.openBank = json['openBank'].toString();
	}
	if (json['realName'] != null) {
		data.realName = json['realName'].toString();
	}
	if (json['amount'] != null) {
		data.amount = json['amount'] is String
				? double.tryParse(json['amount'])
				: json['amount'].toDouble();
	}
	if (json['reason'] != null) {
		data.reason = json['reason'].toString();
	}
	if (json['charges'] != null) {
		data.charges = json['charges'] is String
				? double.tryParse(json['charges'])
				: json['charges'].toDouble();
	}
	if (json['withdrawType'] != null) {
		data.withdrawType = json['withdrawType'] is String
				? int.tryParse(json['withdrawType'])
				: json['withdrawType'].toInt();
	}
	if (json['odd'] != null) {
		data.odd = json['odd'].toString();
	}
	if (json['createTime'] != null) {
		data.createTime = json['createTime'].toString();
	}
	return data;
}

Map<String, dynamic> withdrawEntityEntityToJson(WithdrawEntityEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['userId'] = entity.userId;
	data['amnnId'] = entity.amnnId;
	data['phone'] = entity.phone;
	data['alipay'] = entity.alipay;
	data['unionpay'] = entity.unionpay;
	data['state'] = entity.state;
	data['openBank'] = entity.openBank;
	data['realName'] = entity.realName;
	data['amount'] = entity.amount;
	data['reason'] = entity.reason;
	data['charges'] = entity.charges;
	data['withdrawType'] = entity.withdrawType;
	data['odd'] = entity.odd;
	data['createTime'] = entity.createTime;
	return data;
}